#include <stdio.h>
#include <stdlib.h>

int main()
{
    int randomnum[10],amountofrand=0,j,counter[11]={0};
    while(amountofrand<10) {
        do {
            randomnum[amountofrand] = rand()%10+1;
        } while(counter[randomnum[amountofrand]]!=0);
        counter[randomnum[amountofrand]]++;
        amountofrand++;
    }
    for(j=0; j<10; j++) {
        printf("%d ",randomnum[j]);
    }
    return 0;
}